package com.hqyj.controller;


import com.hqyj.pojo.PaperQuestion;
import com.hqyj.pojo.ResultVo;
import com.hqyj.service.IPaperQuestionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author rock
 * @since 2022-09-14
 */
@RestController
@RequestMapping("/paperQuestion")
public class PaperQuestionController {
    @Autowired
    IPaperQuestionService paperQuestionService;

    @GetMapping("/queryQuetionByPage")
    public ResultVo queryQuetionByPage(PaperQuestion p){
        return paperQuestionService.queryQuetionByPage(p);
    }

    @GetMapping("/add")
    public ResultVo add(PaperQuestion p){
        return paperQuestionService.add(p);
    }


    public ResultVo update(PaperQuestion p){
        return paperQuestionService.update(p);
    }

    @PostMapping ("/del")
    public ResultVo del(Integer id){
        return paperQuestionService.del(id);
    }
}

